//
// Created by luolijun on 2021/11/6.
//

#include "FacadeBase.h"

namespace falcon {

FacadeBase::FacadeBase() {
    _size.width = 50;
    _size.height = 50;
    _center.x = 0;
    _center.y = 0;
    _object = new falcon::Object;
    _styles = new falcon::Styles;
}

FacadeBase::~FacadeBase() {
}

int32_t FacadeBase::id() const {
    return _object->id;
}

const falcon::Object* FacadeBase::object() const {
    return _object;
}

const falcon::Styles* FacadeBase::styles() const {
    return _styles;
}

falcon::Object* FacadeBase::object() {
    return _object;
}

falcon::Styles* FacadeBase::styles() {
    return _styles;
}

falcon::SIZE FacadeBase::size() const {
    return _size;
}

void FacadeBase::size(const falcon::SIZE& sz) {
    _size = sz;
}

falcon::POINT FacadeBase::place() const {
    return _center;
}

void FacadeBase::place(const falcon::POINT& pt) {
    _center = pt;
}

falcon::RECT FacadeBase::rect() const {
    return falcon::RECT { _center.x - _size.width / 2, _center.y - _size.height / 2, _size.width, _size.height };
}
} // namespace falcon
